Oracle® Retail Integration Bus Operations Guide
Release 13.0
  Go To Table Of Contents
Contents

Previous
Previous
 
Next
Next
 

8 Diagnostic and Monitoring Tools

Overview

The RIB Diagnostic and Monitoring Tool Kit (RDMT) is a collection of command line tools, written in UNIX shell script along with supporting Java classes packaged in jar files. There are various tools to address these areas:

The RIB is a complex collection of distributed components and there are a variety of GUI tools. These tools augment those tools and provide command line control and access to all levels of the RIB functions. The tools are written to be stand-alone and to provide examples and capabilities for integrated into enterprise level OSS and management frameworks, such as Oracle Enterprise Manager, Tivoli or HP OpenView.

Functionality

  • Support for Oracle AS - OC4J RIB Version.

  • Support for both local/remote installation.

  • Support for Oracle Streams AQ JMS as the JMS Provider.

  • Support for RIB Hospital databases.

  • Support for JMX control of all RIB Components

  • Support for message Pub/Sub.

All of the scripts are written to be examples of specific functionality, but have been integrated into a simple tool kit that is configuration driven and has a very simple character-based menu system provided to allow a single point of integration.

RDMT and User Roles and Responsibilities

The tools are written to provide capabilities and examples of functions for users with various roles and responsibilities.

The primary target role is the RIB administrator as someone who is responsible for the installation, configuration, and deployment of the RIB components. The ribadmin is also usually then tasked with ongoing RIB Software Life Cycle management as well as production operation support. This person has full permissions on all of the application server directories and has full read and execute permissions on the Oracle Application Server tools such as opmnctl and the OC4J instance subdirectories.

Local or Remote Installations and Capabilities

RDMT can be installed by a user on the system that may or may not have the RIB/OAS environment. RDMT tools support both local and remote OC4J functions via JMX.

In remote installs, some scripts in the toolkit expect the installing user to have read permissions of the OAS home RIB OC4J sub-directories or require execute permission of opmnctl. Therefore, these will return file or permissions errors.

Once the roles and responsibilities of the user have been understood and established, follow the installation instructions. See the RIB Installation Guide.

RDMT Support jars

.jar File Description
rib-jms-api.jar Support classes for jms.
rib-jms-admin-aq-impl.jar Specific impl for AQ
rib-jms-admin.jar Support classes for AQ admin
jmx-cmd-line-ui.jar JMX client
rdmt.jar Support tools

Sample XML Messages

The RDMT release packages a zip file of example xml messages for each message family and message type payload. The zip file is located in the RDMT subdirectory testmsgs.

Tools Overview

RDMT has been designed as a set of command line tools that can serve generally needed functions with examples for retailer specific uses, and to provide a ready to use, low impact application. In many situations, it is a requirement to have tools that consume low bandwidth to manage and triage the RIB. These tools provide alternatives to the GUI based tools. The other common requirement is for control and monitoring command line scripts that can be incorporated into enterprise operations scheduling frameworks, such as Autosys or Appworkx.

RDMT has been organized around a very simple character-based menu system that can be modified to suit the deployment roles and responsibilities and to provide some structure by functional area.

RDMT as an Application

SCRIPTDIR

All of the tools have been organized into a simple application and accessible via the character-based menu system. All of the tools have been designed to execute relative to a based directory (readmit). Within that base directory all tools expect to find all of the support libraries and other scripts. To execute any tool, all that is needed is to set the base directory as an environmental variable; SCRIPTDIR.

Setup

An installation script is provided that determines most of the environment values needed and prompts for the RIB deployment environment specific values. All of the scripts have been designed to be configuration driven by property files. The setup process updates these files.

Current Configuration

Because there are multiple configurations possible with the fully distributed RIB, all of the tools are designed to work against a set of property files that provide the values need to execute. Collectively these are call "current". In the menu system there are functions that allow configuration of n-number of configurations. For example there can be n-number of rib-<app>'s configured. Other functions set runtime configuration files to these "current" configurations. All tools then read these "current" values and perform tasks against them.

RDMTLOGS

All of the tools are designed to produce logs and to use temporary files. The location of these logs is a configuration parameter and defaults to RDMTLOGS within the rdmt base directory.

RDMT Main Menu

This is the main entry point into the RDMT tool kit application. Most selections invoke other submenus, but for convenience several tools, include in other submenus, are directly accessed from this menu.

Surrounding text describes image031.jpg.

OC4J/JMX Utilities

Script Used:

rdmt_jmx_submenu

Description:

This menu option exposes the various tools that use JMX to interact with the OC4J instance and to control or status the current rib-<app> and its components.

Surrounding text describes image033.jpg.
Script Description
jmx_app_state.sh status of the currently active rib application
jmxcmdline_interactive.sh A wrapper to the jmx client support classes. This script directly invoke the interactive functions.
jmxcmdline.sh General wrapper for other tools to invoke specific jmx functions.
jmxconfig.sh There are multiple configurations possible with the fully distributed J2EE RIB. This utility is used to manage the configuration files that allow the rdmt tools to access them. This option can also be used to switch/re-configure the previously configured OC4J/JMX configuration.
jmx_get_logger_names.sh RIB app logging tool
jmx_get_logging_levels_all.sh RIB app logging tool
jmx_get_logging_levels.sh RIB app logging tool
jmx_set_logging_levels.sh RIB app logging tool
jmx_managed_adpaters.sh Common script used by all jmx tools to interact with the jmx client jar. Many of the menu selections merely set the calling parameters to this tool.
jmx_OC4Jribstatus.sh Get the run state of the rib-app OC4J instance and application for all configured.
jmx_OC4Jrib_scan.sh For all configured rib-app scans the state of the instance, app and adapters.
jmx_oc4j_state.sh Status of the currently active OC4J instance.
jmx_switch_config.sh This utility is used to switch the active configuration file that the rdmt tools use.
jmx_tester.sh Test script for testing arbitrary jmx commands within the RDMT framework. This is not a menu selection since it requires user editing.

JMS Tools

Script Used:

rdmt_jmsutil_AQ_submenu

Description:

This menu option exposes the various JMS functionalities available in the tool kit. For convenience some tools in other submenus are presented here as well.

Surrounding text describes image035.jpg.
Script Description
aqjmscmdline.sh Common script used by all JMS tools to interact with the AQ JMS client jar. Many of the menu selections merely set the calling parameters to this tool.
deletemsgAQ.sh Delete message(s) on a specified JMS topic for a specified subscriber.
dmpmsgAQ.sh Dump a message(s) on an AQ JMS topic for a specified subscriber.
dmp_msg_statsAQ.sh Dump properties of message(s) on an AQ JMS topic for a specified subscriber.
jmsconfig.sh RDMT supports configuration of n-number of JMS Providers. This utility configures the values to support.

rdmt_jms_submenu is used to make one the current configuration.

jmstopicsAQ.sh Query the AQ JMS for all of the topics and the message count on each topic.
jmstopicsAQ_scan.sh Query the AQ JMS for just the topics with message counts.
jmsutil.sh This utility provides direct access to the AQ JMS java API utilities.

PUB/SUB Msg Tools

Script Used:

rdmt_msgutil_submenu

Description:

All of the tools is this menu are wrappers that expose functions in the java utilities rib-jms-api.jar included in the tool kit library. These are general purpose pub/sub functions that are written to support the various JMS Providers for the RIB, e.g. AQ JMS.

Surrounding text describes image037.jpg.
Script Description
pubmsgutil.sh Provides direct access the java api by prompting for all of the expected command line values it expects.
submsgutil.sh Provides direct access the java api by prompting for all of the expected command line values it expects.
submsg.sh Higher level wrapper that uses the configuration values to shortcut the values needed to call the java api's.
pubmsg.sh Higher level wrapper that uses the configuration values to shortcut the values needed to call the java api's.
pubmsgutil_multiple.sh Script that supports multi-message publication.
pubmsgutil_directory.sh Script that supports multi-message publication.
ejbpub_util.sh utility to wrapper the EJB Message Publish java api.

RIB Health Tools

Script Used:

rdmt_ribhealth_submenu

Description:

This option leads the user to the submenu through which the user can get the current RIB health status.

Surrounding text describes image039.jpg.
Script Description
cron_ribhealth.sh See the section, "RIB Health", in this chapter.
ribejbping.sh See the section, "EJB Ping (RIB)", in this chapter.
appejbping.sh See the section, "EJB Ping (RIB)", in this chapter.
loglookoc4j.sh See the section, "Scan RIB Logs / Scan RIB Logs (Delta)", in this chapter.
loglookoc4j_delta.sh See the section, "Scan RIB Logs / Scan RIB Logs (Delta)", in this chapter.
timingsutil.sh See the section, "RIB Timings Utility", in this chapter.
ttestrms.sh This script scans a list of RMS MFQ tables using a JDBC connection. (see mfqtables.conf).
ttestrdm.sh This script scans a list of RWMS Upload tables using a JDBC connection. (see uploadtables.conf).
OC4JConfigReport.sh See the section, "RIB Configuration Report", in this chapter.

Hospital Scan Tools

Script Used:

rdmt_hosp_submenu

Description:

This option leads the user to the RIB hospital for various applications submenu through which the user can get the current RIB hospital status.

Surrounding text describes image041.jpg.
Script Description
htest.sh This script calls a java class that uses JDBC to access the database(s) containing the Hospital tables.

It scans the Hospital RIB_MESSAGES table and report thing such as:

  • how many messages (row count),

  • how many have exceed the retry count,

  • how many messages of a topic as present.

htest_failures.sh This script calls a java class to scan the RIB Hospital Message Failure table using a JDBC connection.

RIB Admin Tools

Script Used:

rdmt_ribadmin_submenu

Description:

The ribadmin script was stand-alone in previous RIB releases. In RIB 13.0, those functions have been moved into this menu item. The ribadmin.sh script is sourced to make the existing functions available to the menu items and the variables that the scripts expected have been mapped to rdmt configuration files.

Since many of the functions expect execute permissions on opmnctl as well as read/write permissions on the OAS directory tree, this menu and the tools are designed for the ribadmin role.

If RDMT is installed in the RIB App Builder rib-home and that is accessible and configured, then this menu exposes the rib-app-builder menu selection. A test is performed to verify the rib-home is configured, if not, then the selection will not appear.

Surrounding text describes image043.jpg.
Script Description
ribadmin.sh This script contains most all of the functions that are exposed by this menu.

RIB App Builder Tools

Script Used:

rdmt_ribappbuilder_submenu

Description:

This option leads the user to the RIB App Builder tools installed in the rib-home. For a description of the tools and usage, see Chapter 2, "Application Builder".

Surrounding text describes image045.jpg.

Scan RIB Logs / Scan RIB Logs (Delta)

Scripts Used:

loglookoc4j.sh, scan_logs.sh, loglookoc4j_delta.sh, scan_logs_delta.sh

Description:

These scripts perform a log scan to look for a pattern ("Exception") in all of the log files in a directory of the currently active OC4J instance. Since they perform file system scans, the RDMT tools must be installed on the host that contains these logs and must have read permissions on the directories and the files.

As the tool scans all of the logs it writes the matches to a single log file. This becomes the base file. A second script (delta) looks for the same pattern, but compares the matches against the base file, and outputs only new ones. The primary scripts are the scan_logs.sh and the scan_logs_delta.sh. The files created and used by these scripts are controlled by the rdmt.conf entries.

The location of these files should be sized to handle large text files, since it is possible for there to be many exceptions and these will contain the consolidated entries from potentially hundreds of logs. The location is the tmp files parameter set during RDMT install and is defaulted to RDMTLOGS/tmp.

RIB Health

Script Used:

cron_ribhealth.sh

Description:

This utility is a general purpose script that invokes other tools and functions in the tool kit to take a snapshot in time of the run-time state of all of the configured rib-apps. Because this script uses specific jar files as well as other tools in the tool kit, it requires that SCRIPTDIR be set to the rdmt base directory.

It produces a rib_health report on the console as well as a time-stamped log written to the RDMTLOGS/tmp directory. Each execution of the script produces one of the logs, and then over-writes a log called lastrun as well. There is a menu selection that views the lastrun report.

RIB Configuration Report

Script Used:

OC4JConfigReport.sh

Description:

After the RIB has been installed and configured on OAS, the user can verify all the installations and configurations using RDMT. In order to achieve this functionality a script has been provided and linked in the RDMT menu which scans the installations and configurations of rib applications deployed using the configuration settings in the RDMT configuration files.

It is recommended that after the installation is complete, the user runs the RIB Config Report utility under the RIB Health Menu option. This outputs the results of the scan on the console as well as in an output file under the specified TEMP FILES DIRECTORY. Each run produces a time-stamped log and updates a log called lastrun-config that is viewable from a menu selection.

This script was written to take a snapshot of the RIB environment and test for basic configuration issues. This utility performs the following functions.

RIB Timings Utility

Script Used:

timingsutil.sh

Description:

The RIB can logs a set of timing entries whenever it creates, transform, routes, filters, or subscribes to messages on the RIB. This utility on functions when RDMT is installed on the host system where the logs are generated and the RDMT user has permissions to read the log directories.

The timingsutil.sh script is a wrapper to the RIBTimings java class. This script runs the RibTimings post processor on an adapter's timing file. It prompts for the adapter name then it analyzes the timings logs for that particular adapter. The output is to the screen as well as a file of CSV format in the RDMT temp files directory; RDMTLOGS/tmp/<adapter>.csv. which contains the detailed analysis of timings logs.

This csv file can be directly viewed by Excel. To use this function, the adapter timing log parameters must be set to DEBUG.

EJB Publish Utility

Script Used:

ejbpub_util.sh

Class:

RibMessagePublisherClient

Description:

This utility was developed to wrapper the EJB Message Publish Java API. The ejbpub_util.sh is a wrapper script to RibMessagePublisherClient. It calls the specified EJB service and publishes the message on to the AQ JMS. It uses the platform service to publish the message. The user needs to specify the necessary parameters.

Usage:

EJB Ping (RIB)

Script Used:

ribejbping.sh

Class:

RibMessageInjectorClient

Description:

This utility is developed to ping any RIB-<app> EJB component. This helps to test the connectivity between the rib-<app> and the <app> where app refers to RMS, SIM, RWMS, RPM and AIP. This uses the platform configuration to call the EJBs. The user needs to put the necessary config files namely services_*.xml, jndi_providers_*.xml and service_flavors_*.xml of the particular rib-<app> under $HOME/rdmtXX/rib-app/extracted_conf_from_rib-<app>/retek folder before using this utility option. The user can also use the jndi_config_extractor.sh script for extracting the necessary config files from the system.

The jndi_config_extractor.sh script can be found under the RDMT home directory. The user needs to copy the jndi_config_extractor.sh script to the machine where the particular rib-<app> is deployed and then execute the script. The user can execute this script from any place in that machine. The user also needs to set JAVA_HOME before running this script. This script will extract the files namely services_*.xml, jndi_providers_*.xml and service_flavors_*.xml files of that particular rib-<app> instance by checking the entire file system. All the extracted xml files are finally zipped into xmlfiles.zip in the current directory from where this script was executed. The user then needs to transfer/ftp this xmlfiles.zip into the server where RDMT is installed and put these files under $HOME/rdmtXX/rib-app/extracted_conf_from_rib-<app>/retek folder.

After performing the above steps, the user can execute the RIB EJB Ping menu option.

EJB Ping (APP)

Script Used:

appejbping.sh

Class:

RibMessagePublisherClient

Description:

This utility is developed to ping any <app> EJB component. This helps to test the connectivity between the rib-<app> and the <app> where app refers to only SIM, RPM and AIP. This uses the platform configuration to call the EJBs. The user needs to put the necessary config files namely services_*.xml, jndi_providers_*.xml and service_flavors_*.xml of the particular <app> under $HOME/rdmtXX/ app/extracted_conf_from_<app>/retek folder before using this utility option. The user can also use the jndi_config_extractor.sh script for extracting the necessary config files from the system.

The jndi_config_extractor.sh script can be found under the RDMT home directory. The user needs to copy the jndi_config_extractor.sh script to the machine where the particular <app> is deployed and then execute the script. The user can execute this script from any place in that machine. The user also needs to set JAVA_HOME before running this script. This script will extract the files namely services_*.xml, jndi_providers_*.xml and service_flavors_*.xml files of that particular <app> by checking the entire file system. All the extracted xml files are finally zipped into xmlfiles.zip in the current directory from where this script was executed. The user then needs to transfer/ftp this xmlfiles.zip into the server where RDMT is installed and put these files under $HOME/rdmtXX/app/extracted_conf_from_<app>/retek folder.

After performing the above steps, the user can execute the APP EJB Ping menu option

Tool Usage Examples

"How do I know if the RIB install is correct?"

  1. Using the RDMT Menu system, select the RIB Health SubMenu.

  2. Execute RIB Config Report option. This produces the basic report on installation.

    • This scans the installations and configurations of rib applications deployed in oc4j. It finally produces a RIB OC4J configuration report on the console as well as written into a file under the RDMT Temp directory, which contain the status of all the RIB configurations necessary to detect/diagnose any RIB related issues.

  3. If you find any discrepancies, refer to the RIB Installation Guide and follow the steps mentioned there.

"How do I know if the local OC4J is running or not?"

  1. Using the RDMT Menu system, select the RIB Health SubMenu.

  2. Execute local OC4J status (opmn) option. It displays the current OC4j status.

  3. If it is not running, start the local OC4J using the start instance (opmn) under the RIB Admin Menu.

"How do I know where my issue is occurring?"

  1. Select RDMT Main Menu.

  2. Execute the Scan RIB Logs option. It performs a log scan to look for a /pattern/ ("Exception") in all of the log files in a directory of the currently active OC4J instance.

  3. Select JMS Topic Scan. Look for topics with messages stuck.

"How do I know if the adapter's status is up or down?"

  1. Select OC4J/JMX Utilities Menu.

  2. Execute Status ALL Adapters option. It displays the status of all the adapters, namely the publishers, subscribers, hospital and TAFR for the currently active OC4J instance.

  3. If anything is down, use the Start ALL adapters option and start the same.

"How can I config/switch for a new OC4J instance?"

  1. Select OC4J/JMX Utilities Menu.

  2. Execute OC4J/JMX Config Utility option.

  3. Provide the desired parameters and configure an instance.

  4. You can switch to the desired instance using the same option.

"How do I know if the configured OC4J instance is running?"

  1. Select OC4J/JMX Utilities Menu.

  2. Execute Status all config'd OC4J. It displays the status of all the configured OC4J instances.

  3. If it is not running, start the same.

"How do I know the subscriber for a particular JMS topic?"

  1. Select RDMT Main Menu.

  2. Then select JMS Utilities Menu.

  3. Execute the JMS Topics Subscribe List option.

  4. Provide the topic name for which the subscriber name is needed. It provides the same.